package com.wanghengzhi.kata;

/**
 *
 * @author wanghengzhi
 * @since 2021/11/6 22:01
 */
public class RegularGoods extends Goods {
    public RegularGoods(double quality, int sellIn) {
        super("Regular", quality, sellIn);
    }

    @Override
    public void updateByDay() {
        decreaseByOneIfQualityGreatThanZero();
        decreaseSellInByOne();
        if (sellIn < 0) {
            decreaseByOneIfQualityGreatThanZero();
        }
    }
}
